package com.moyun.zbmy.youxian.ui.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
import android.support.annotation.Nullable;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.canyinghao.canrefresh.CanRefreshLayout;
import com.google.gson.Gson;
import com.jiongbull.jlog.JLog;
import com.moyun.zbmy.youxian.R;
import com.moyun.zbmy.youxian.application.Constances;
import com.moyun.zbmy.youxian.base.BaseActivity;
import com.moyun.zbmy.youxian.beans.FocusColumn;
import com.moyun.zbmy.youxian.beans.HomeListItem;
import com.moyun.zbmy.youxian.beans.NewsClickCountBean;
import com.moyun.zbmy.youxian.beans.NewsIdBean;
import com.moyun.zbmy.youxian.beans.NewsItem;
import com.moyun.zbmy.youxian.beans.NewsListClickRequestBean;
import com.moyun.zbmy.youxian.beans.NewsListClickVo;
import com.moyun.zbmy.youxian.http.AbsListNetCallback;
import com.moyun.zbmy.youxian.http.AbsNetCallBack;
import com.moyun.zbmy.youxian.http.NetUtils;
import com.moyun.zbmy.youxian.ui.activities.CivActivity;
import com.moyun.zbmy.youxian.ui.activities.LivingActivity;
import com.moyun.zbmy.youxian.ui.activities.MessageSettingActivity;
import com.moyun.zbmy.youxian.ui.adapter.CultureTravelAdapter;
import com.moyun.zbmy.youxian.ui.dialog.ConfirmDiaFragment;
import com.moyun.zbmy.youxian.ui.util.IListShowData;
import com.moyun.zbmy.youxian.utils.ListTypeUtils;
import com.ruihang.generalibrary.utils.GroupOrderHelperSingled;
import com.ruihang.generalibrary.utils.ListUtils;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import okhttp3.MediaType;
import okhttp3.RequestBody;

/**
 * 文旅  栏目
 */
public class CivFragment extends ColumnBaseFragment  {
    @BindView(R.id.tv_1)
    protected TextView tv_1;
    @BindView(R.id.tv_2)
    protected TextView tv_2;
    @BindView(R.id.tv_3)
    protected TextView tv_3;
    @BindView(R.id.tv_4)
    protected TextView tv_4;

    String url1 ="/sctv/hhxx/index/hhxx.json";
    String url2 ="/sctv/zyfw/index/zyfw.json";
    String url3 ="/sctv/sdxf/index/sdxf.json";
    String url4 ="/sctv/szgz/index/szgz.json";






    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_civ, container, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @OnClick({R.id.tv_1, R.id.tv_2, R.id.tv_3, R.id.tv_4})
    protected void onclick(View view) {
        switch (view.getId()) {
            case R.id.tv_1:
                Intent intent = new Intent(getActivity(), CivActivity.class);
                intent.putExtra(BaseActivity.EX_URL,url1);
                intent.putExtra(BaseActivity.EX_TITLE,"好好学习");
                getActivity().startActivity(intent);
                break;
            case R.id.tv_2:
                Intent intent2 = new Intent(getActivity(), CivActivity.class);
                intent2.putExtra(BaseActivity.EX_URL,url2);
                intent2.putExtra(BaseActivity.EX_TITLE,"志愿服务");
                getActivity().startActivity(intent2);
                break;
            case R.id.tv_3:
                Intent intent3 = new Intent(getActivity(), CivActivity.class);
                intent3.putExtra(BaseActivity.EX_URL,url3);
                intent3.putExtra(BaseActivity.EX_TITLE,"时代新风");
                getActivity().startActivity(intent3);
                break;
            case R.id.tv_4:
                Intent intent4 = new Intent(getActivity(), CivActivity.class);
                intent4.putExtra(BaseActivity.EX_URL,url4);
                intent4.putExtra(BaseActivity.EX_TITLE,"思政工作");
                getActivity().startActivity(intent4);
                break;

        }
    }

    @Override
    protected void initViews(View v, @Nullable Bundle savedInstanceState) {
        LinearLayoutManager layoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);

    }


}
